import Vue from 'vue'
import { ACCESS_TOKEN,USER_INFO} from "@/store/mutation-types"
const getters = {
  device: state => state.app.device,
  theme: state => state.app.theme,
  color: state => state.app.color,
  token: state => Vue.ls.get(ACCESS_TOKEN),
  avatar: state => {state.user.logoImageUrl = Vue.ls.get(USER_INFO).logoImageUrl; return state.user.logoImageUrl},
  userLoginId: state => state.user.info.userLoginId,
  firstName: state => {state.user.firstName = Vue.ls.get(USER_INFO).firstName; return state.user.firstName},
  welcome: state => state.user.welcome,
  permissionList: state => state.user.permissionList,
  userInfo: state => {state.user.info = Vue.ls.get(USER_INFO); return state.user.info},
  addRouters: state => state.permission.addRouters,
  buData: state => state.user.buData,
  departmentId: state => {state.user.info = Vue.ls.get(USER_INFO).departmentId; return state.user.departmentId},
}

export default getters